<?php SQLFile::start() ?>

INSERT INTO exam_session_question
(exam_session_id, exam_question_id)
SELECT :exam_session_id, exam_question_id
	FROM exam_question
	WHERE lesson_id IN ( <?php echo implode( ',', $lesson_ids) ?> )
	ORDER BY RAND()
	LIMIT :num_items
	


<?php return SQLFile::end();